#define _CRT_SECURE_NO_WARNINGS


#include <stdio.h>

int main()
{
    int shi, ke, guo, qi;
    scanf("%d %d %d %d ", &shi, &ke, &guo, &qi);
    float sum = 0;
    sum = shi * 0.2 + ke * 0.1 + guo * 0.2 + qi * 0.5;
    printf("%.1f\n", sum);

    return 0;
}
